package com.jeesite.modules.dataScreen.domain.monitoring;

import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

@Getter
public enum MonitoringSourceTye {
    //'媒体类型 (全部:"", 网媒:"01", 微博:"04", 微信:"06", 论坛:"02", 博客:"03", 报刊:"05", 视频:"07", APP:"09", 其他:"99")';
    ALL("", "全部"),
    WM("01", "网媒"),
    WB("04", "微博"),
    WX("06", "微信"),
    LT("02", "论坛"),
    BK("03", "博客"),
    GK("05", "报刊"),
    SP("07", "视频"),
    APP("09", "APP"),
    a("11", ""),
    QT("99", "其他"),
    ;
    private final String type;
    private final String name;

    private static Map<String, String> map = new HashMap<>();

    static {
        MonitoringSourceTye[] values = MonitoringSourceTye.values();
        for (MonitoringSourceTye value : values) {
            map.put(value.type, value.name);
        }
    }

    MonitoringSourceTye(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public static String toName(String type) {
        return map.get(type);
    }
}
